<template>
	<view class="body">

		<view class="item">
			<view class="image">
				<image style="width: 100%;height: 100%;border-radius: 100%;" :src="global+userInfo.icon" mode=""></image>
			</view>
			<view class="box_item">
				<view class="title" style="display: flex;">姓名</view>
				<view class="in-ys">{{userInfo.username}}</view>
			</view>
			<view class="box_item">
				<view class="title" style="display: flex;">邮箱</view>
				<view class="in-ys">{{userInfo.email}}</view>
			</view>
			<view class="box_item">
				<view class="title" style="display: flex;">电话</view>
				<view class="in-ys">{{userInfo.phone}}</view>
			</view>
			
		</view>
		<view class="button" @click="back">返回</view>
	</view>
</template>

<script>
	import G from '@/config/global.js'
	export default {
		data() {
			return {
				userInfo: {},
				global: G.REQUEST_URL
			}
		},
		onLoad() {
			this.userInfo = uni.getStorageSync("user")
		},
		methods: {
			back(){
				uni.navigateBack({
					delta:1
				})
			}
		}
	}
</script>

<style>
	.body {
		padding: 32rpx;
		box-sizing: border-box;
	}

	.item {
		position: absolute;
		width: 100%;
	}

	.image {
		position: relative;
		left: 50%;
		transform: translateX(-50%);
		width: 132rpx;
		height: 132rpx;
		border-radius: 100%;
	}

	.title {
		width: 160rpx;
		margin-right: 30rpx;
		font-family: 'PingFang SC';
		font-style: normal;
		font-weight: 400;
		font-size: 28rpx;
		line-height: 40rpx;
		color: rgba(51, 51, 51, 0.4);
		text-align: left;
	}

	.in-ys {
		width: 80%;
		border-radius: 8rpx;
		/* background: #F6F6F6; */
	}

	.box_item {
		display: flex;
		padding: 24rpx 0px;
		align-items: center;
		position: relative;
		/* justify-content: space-between; */
		border-bottom: 1px solid #fafafa;
	}
	.button{
		position: absolute;
		bottom: 40rpx;
		width: 95%;
		left: 50%;
		transform: translateX(-50%);
		color: #fff;
		background-color: #07b1ff;
		padding: 32rpx;
		border-radius: 64rpx;
		text-align: center;
	}
</style>